<!DOCTYPE html>
<html lang="en">
<head>
   <include file="Public:header" />
    <title></title>
</head>
<body class="eee">
	 <include file="Public:head" />
    <div class="mb50 mt50">
    	<p class="lhg-xiugaim"><input type="password" id="password1" placeholder="请输入旧密码" /></p>
    	<p class="lhg-xiugaim"><input type="password" id="password2" placeholder="请输入新密码" /></p>
    	<p class="lhg-xiugaim"><input type="password" id="password3" placeholder="请确认新密码" /></p>
    	<a href="javascript:;" onClick="edit_pwd()" class="lhg-ab">确定</a>
    </div>
	 <include file="Public:footer" />
	 <script>
	 function edit_pwd(){
		var password1=$("#password1").val();
		var password2=$("#password2").val();
		var password3=$("#password3").val();
		$.getJSON("<{:U('User/edit_pwd')}>",{password1:password1,password3:password3,password2:password2},function(data){
		   if(data.error>0){
				   dialog(data.msg);
				}else{
				   alert("修改成功");
					window.location.href="/User/index";
				}
		})
	 }
	 </script>
	 	<div id="dialog1"></div>
	<div id="bg"></div>
	<div id="dialog"></div>
</body>
</html>